import { createTheme } from "@mui/material/styles"

// 创建 Material UI 主题配置 - 现代化科技风格
const theme = createTheme({
	palette: {
		mode: "light",
		primary: {
			main: "#2563EB", // 现代蓝
			light: "#3B82F6",
			dark: "#1D4ED8",
			contrastText: "#ffffff"
		},
		secondary: {
			main: "#7C3AED", // 现代紫
			light: "#8B5CF6",
			dark: "#6D28D9",
			contrastText: "#ffffff"
		},
		background: {
			default: "#F8FAFC", // 浅灰背景
			paper: "#FFFFFF"
		},
		text: {
			primary: "#1E293B",
			secondary: "#64748B"
		},
		success: {
			main: "#10B981"
		},
		warning: {
			main: "#F59E0B"
		},
		error: {
			main: "#EF4444"
		},
		grey: {
			50: "#F9FAFB",
			100: "#F3F4F6",
			200: "#E5E7EB",
			300: "#D1D5DB",
			400: "#9CA3AF",
			500: "#6B7280",
			600: "#4B5563",
			700: "#374151",
			800: "#1F2937",
			900: "#111827"
		}
	},
	typography: {
		fontFamily: [
			"-apple-system",
			"BlinkMacSystemFont",
			'"Segoe UI"',
			"Roboto",
			'"Helvetica Neue"',
			"Arial",
			"sans-serif",
			'"Apple Color Emoji"',
			'"Segoe UI Emoji"',
			'"Segoe UI Symbol"'
		].join(","),
		h1: {
			fontSize: "2.125rem",
			fontWeight: 500,
			lineHeight: 1.235
		},
		h2: {
			fontSize: "1.5rem",
			fontWeight: 500,
			lineHeight: 1.334
		},
		h3: {
			fontSize: "1.25rem",
			fontWeight: 500,
			lineHeight: 1.6
		},
		body1: {
			fontSize: "1rem",
			lineHeight: 1.5
		},
		body2: {
			fontSize: "0.875rem",
			lineHeight: 1.43
		}
	},
	shape: {
		borderRadius: 8 // 统一圆角
	},
	components: {
		// 自定义组件样式 - 现代化设计
		MuiButton: {
			styleOverrides: {
				root: {
					textTransform: "none",
					borderRadius: 12,
					fontWeight: 600,
					transition: "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
					"&:hover": {
						transform: "translateY(-1px)",
						boxShadow: "0 4px 12px rgba(37, 99, 235, 0.15)"
					}
				}
			}
		},
		MuiPaper: {
			styleOverrides: {
				root: {
					background: "rgba(255, 255, 255, 0.95)",
					backdropFilter: "blur(10px)",
					border: "1px solid rgba(148, 163, 184, 0.2)",
					boxShadow: "0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)"
				}
			}
		},
		MuiTextField: {
			styleOverrides: {
				root: {
					"& .MuiOutlinedInput-root": {
						borderRadius: 12,
						background: "rgba(255, 255, 255, 0.8)",
						backdropFilter: "blur(5px)",
						border: "1px solid rgba(148, 163, 184, 0.3)",
						transition: "all 0.2s ease",
						"&:hover": {
							borderColor: "rgba(148, 163, 184, 0.5)"
						},
						"&.Mui-focused": {
							borderColor: "#2563EB",
							boxShadow: "0 0 0 2px rgba(37, 99, 235, 0.1)"
						}
					}
				}
			}
		},
		MuiAppBar: {
			styleOverrides: {
				root: {
					background: "rgba(255, 255, 255, 0.95)",
					backdropFilter: "blur(10px)",
					borderBottom: "1px solid rgba(148, 163, 184, 0.2)"
				}
			}
		},
		MuiSelect: {
			styleOverrides: {
				root: {
					borderRadius: 8,
					background: "rgba(255, 255, 255, 0.8)",
					"&:hover": {
						background: "rgba(255, 255, 255, 1)"
					}
				}
			}
		}
	}
})

export default theme
